﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Data;
using System.Data.DataSetExtensions;

using ProjectCommon2.Wcf.MessageHeaders;
using ProjectCommon2.Wcf.Attributes;

namespace PolePosition.v3.WcfService
{
    [ServiceContract(Name = "Administration", Namespace = "PolePosition.v3.WcfService")]
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple, IncludeExceptionDetailInFaults = true)]
    [ProjectCommon2.Wcf.Behaviors.GetContextServiceBehavior()]
    public class Administration
    {
        [OperationContract]
        [MaxDataContractSerializerOperationBehavior]
        public EntityLibrary.LoginEntity DoLogin(string userName, string password)
        {
            return EntityFactory.AdministrationDataFactory.DoLogin(userName, password);
        }

        [OperationContract]
        [MaxDataContractSerializerOperationBehavior]
        public EntityLibrary.LookupTables GetLookups()
        {
            return EntityFactory.LookupTableFactory.GetLookups();
        }
    }
}
